let { Schema, model } = require('mongoose')
//设置数据集合的结构
let    customerSchemas = new Schema({
  username: String,
  password: String,
  brith: String,
  img: String,
  nickName: String,
  tel: String,
  state: String,
  salesmanId: {
     type:Schema.Types.ObjectId,
     ref: 'SalesPerson'
  }
},{versionKey:false});
//设置数据集合的模型
let customer = model("customer", customerSchemas, 'customer')
module.exports.customer=customer;